home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / othergnu / less-1~1.zoo / makefile < prev    next >
Encoding:
Makefile  |  1992-05-03  |  4.6 KB  |  146 lines

  1. # Makefile for "less"
  2. # Generated Sun May  3 21:26:32  1992 by ./linstall.
  3. #
  4. # Invoked as:
  5. #    make all
  6. #   or    make install
  7. # Plain "make" is equivalent to "make all".
  8. #
  9. # If you add or delete functions, remake funcs.h by doing:
  10. #    make newfuncs
  11. # This depends on the coding convention of function headers looking like:
  12. #    " \t public <function-type> \n <function-name> ( ... ) "
  13. #
  14. # Also provided:
  15. #    make lint    # Runs "lint" on all the sources.
  16. #    make clean    # Removes "less" and the .o files.
  17. #    make clobber    # Pretty much the same as make "clean".
  18.  
  19. CC = /bin/gcc.ttp
  20. SHELL = /bin/bash.ttp
  21.  
  22.  
  23. ##########################################################################
  24. # Compilation environment.
  25. ##########################################################################
  26.  
  27. # LIBS is the list of libraries needed.
  28. LIBS = -ltermcap
  29.  
  30. # INSTALL_LESS is a list of the public versions of less.
  31. # INSTALL_KEY is a list of the public versions of lesskey.
  32. # INSTALL_HELP is a list of the public version of the help file.
  33. # INSTALL_LESSMAN is a list of the public versions of the less manual page.
  34. # INSTALL_KEYMAN is a list of the public versions of the lesskey manual page.
  35. INSTALL_LESS =        /bin/less.ttp
  36. INSTALL_KEY =        /bin/lesskey.ttp
  37. INSTALL_HELP =        /etc/less.hlp
  38. INSTALL_LESSMAN =    /lib/man/less.1
  39. INSTALL_KEYMAN =    /lib/man/lesskey.1
  40. LESS_MANUAL =        less.nro
  41. KEY_MANUAL =        lesskey.nro
  42. HELPFILE =        /etc/less.hlp
  43.  
  44.  
  45. # OPTIM is passed to the compiler and the loader.
  46. # It is normally "-O" but may be, for example, "-g".
  47. OPTIM = -O2 -fstrength-reduce -fomit-frame-pointer -finline-functions -fwritable-strings
  48.  
  49. CFLAGS = $(OPTIM)
  50.  
  51.  
  52.  
  53. ##########################################################################
  54. # Files
  55. ##########################################################################
  56.  
  57. SRC1 =    ch.c cmdbuf.c command.c decode.c help.c input.c 
  58. SRC2 =    line.c linenum.c main.c edit.c option.c optfunc.c \
  59.     opttbl.c os.c 
  60. SRC3 =    charset.c filename.c lsystem.c output.c position.c ifile.c \
  61.     brac.c forwback.c jump.c search.c regerror.c
  62. SRC4 =    mark.c prompt.c screen.c signal.c tags.c ttyin.c version.c
  63.  
  64. SRC =    $(SRC1) $(SRC2) $(SRC3) $(SRC4)
  65.  
  66. OBJ =    brac.o ch.o charset.o cmdbuf.o command.o decode.o edit.o filename.o \
  67.     forwback.o help.o input.o jump.o line.o linenum.o \
  68.     lsystem.o main.o option.o optfunc.o opttbl.o os.o \
  69.     output.o position.o mark.o ifile.o prompt.o screen.o \
  70.     search.o regerror.o signal.o tags.o ttyin.o version.o
  71.  
  72.  
  73. ##########################################################################
  74. # Rules for building stuff
  75. ##########################################################################
  76.  
  77. all: less.ttp lesskey.ttp
  78. install: install_less install_help install_key install_lman install_kman
  79.  
  80. less.ttp: $(OBJ)
  81.     $(CC) $(LDFLAGS) $(OPTIM) -o less.ttp $(OBJ) $(LIBS) $(LDLIBS)
  82.  
  83. lesskey.ttp: lesskey.o
  84.     $(CC) $(LDFLAGS) $(OPTIM) -o lesskey.ttp lesskey.o $(LDLIBS)
  85.  
  86. install_less: less
  87.     for f in $(INSTALL_LESS); do  rm -f $$f; cp less $$f;  done
  88.     touch install_less
  89.  
  90. install_key: lesskey
  91.     for f in $(INSTALL_KEY); do  rm -f $$f; cp lesskey $$f;  done
  92.     touch install_key
  93.  
  94. install_help: less.hlp
  95.     for f in $(INSTALL_HELP); do  rm -f $$f; cp less.hlp $$f;  done
  96.     touch install_help
  97.  
  98. install_lman: $(LESS_MANUAL) 
  99.     for f in $(INSTALL_LESSMAN); do  rm -f $$f; cp $(LESS_MANUAL) $$f;  done
  100.     touch install_lman
  101.  
  102. install_kman: $(KEY_MANUAL)
  103.     for f in $(INSTALL_KEYMAN); do  rm -f $$f; cp $(KEY_MANUAL) $$f;  done
  104.     touch install_kman
  105.  
  106. ##########################################################################
  107. # Maintenance
  108. ##########################################################################
  109.  
  110. lint:
  111.     lint -hp $(SRC)
  112.  
  113. newfuncs funcs.h:
  114.     if [ -f funcs.h ]; then mv funcs.h funcs.h.OLD; fi
  115.     awk -f mkfuncs.awk $(SRC) >funcs.h
  116.  
  117. clean:
  118.     rm -f $(OBJ) lesskey.o less lesskey vecho.ttp
  119.  
  120. clobber:
  121.     rm -f *.o less lesskey vecho.ttp install_less install_key \
  122.         install_help install_lman install_kman
  123.  
  124. shar:
  125.     shar -v README CHANGES linstall \
  126.         less.nro lesskey.nro \
  127.         vecho.c mkfuncs.awk > less1.shr
  128.     shar -v less.man lesskey.man \
  129.         less.h position.h cmd.h option.h > less2.shr 
  130.     shar -v lesskey.c $(SRC1) > less3.shr
  131.     shar -v $(SRC2) > less4.shr
  132.     shar -v $(SRC3) less.hlp > less5.shr
  133.     shar -v $(SRC4) funcs.h > less6.shr
  134.  
  135.  
  136. ##########################################################################
  137. # Dependencies
  138. ##########################################################################
  139.  
  140. $(OBJ): less.h funcs.h defines.h position.h
  141. command.o decode.o: cmd.h
  142. option.o opttbl.o optfunc.o: option.h
  143.  
  144. lesskey.o: less.h funcs.h defines.h cmd.h
  145.  
  146.